package com.water.wfo.component.redis.config;

import com.water.wfo.component.redis.RedisService;
import com.water.wfo.component.redis.WfoRedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;

import javax.annotation.Resource;

/**
 * packageName com.water.wfo.component.redis.config
 *
 * @author
 * @className WfoCacheConfig(处以class为网)
 * @date 2025/3/13
 * @description T0D0
 */
@Configuration
public class WfoCacheConfig {

    @Resource(name="stringRedisTemplate")
    private StringRedisTemplate redisTemplate;
    /*@Resource
    private RedisTemplate<String, Object> redisTemplate;*/


  /*  @Bean
    public RedisService redisService() {
        return new RedisService(redisTemplate);
    }*/

   // @Lazy
    @Bean(name="wfoRedisService")
    public WfoRedisService WfoRedisService() {
        return new WfoRedisService(redisTemplate);
    }

}
